d98130c0610da23db2dccedd58033a647b0afeff,server/src/com/cloud/user/AccountManagerImpl.java,AccountManagerImpl,enableAccount,#String#number#,969

Before Change


    public AccountVO enableAccount(String accountName, long domainId) {
        
        // Check if account exists
        Account account = _accountDao.findActiveAccount(accountName, domainId);
        if (account == null || account.getType() == Account.ACCOUNT_TYPE_PROJECT) {
            throw new InvalidParameterValueException("Unable to find account " + accountName + " in domain " + domainId);
        }

After Change


        
        // Check if account exists
        Account account = null;
        if(accountId != null){
            account = _accountDao.findById(accountId);
        }else{
            account = _accountDao.findActiveAccount(accountName, domainId);
        }
        
        if (account == null || account.getType() == Account.ACCOUNT_TYPE_PROJECT) {